package com.zmn.oms.services.impl.conf.distribute;

import com.zmn.oms.model.entity.conf.distribute.CheckCityAvailableQuery;
import com.zmn.oms.model.entity.conf.distribute.NonGridRobOrderConfig;
import com.zmn.oms.model.entity.conf.distribute.NonGridRobOrderConfigQuery;
import com.zmn.oms.persistence.interfaces.conf.distribute.NonGridRobOrderConfigDao;
import com.zmn.oms.services.interfaces.conf.distribute.NonGridRobOrderConfigService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 类描述
 *
 * @author fubiao
 * @since 2022/07/18
 */
@Service
public class NonGridRobOrderConfigServiceImpl implements NonGridRobOrderConfigService {

    @Resource
    private NonGridRobOrderConfigDao nonGridRobOrderConfigDao;

    @Override
    public NonGridRobOrderConfig findByKey(Integer nonGridConfigId) {
        return nonGridRobOrderConfigDao.findByKey(nonGridConfigId);
    }

    @Override
    public List<NonGridRobOrderConfig> listByPlatIdAndBizType(List<Integer> platIds, Integer bizType,
                                                              Integer distributeWay) {
        return nonGridRobOrderConfigDao.listCompanyByPlatIdAndType(platIds, bizType, distributeWay);
    }

    @Override
    public List<NonGridRobOrderConfig> listNoGridRobConfigByQuery(NonGridRobOrderConfigQuery configQuery) {
        return nonGridRobOrderConfigDao.listNoGridRobConfigByQuery(configQuery);
    }

    @Override
    public Integer countByQuery(NonGridRobOrderConfigQuery configQuery) {
        return nonGridRobOrderConfigDao.countByQuery(configQuery);
    }

    @Override
    public List<Integer> hasBeenSetCity(CheckCityAvailableQuery query) {
        return nonGridRobOrderConfigDao.hasBeenSetCity(query);
    }

    @Override
    public Integer insert(NonGridRobOrderConfig nonGridRobOrderConfig) {
        return nonGridRobOrderConfigDao.insert(nonGridRobOrderConfig);
    }

    @Override
    public Integer update(NonGridRobOrderConfig nonGridRobOrderConfig) {
        return nonGridRobOrderConfigDao.updateByKey(nonGridRobOrderConfig);
    }
}
